package com.ruoyi.biz.service.impl;

import java.util.List;

import com.ruoyi.biz.domain.query.BizBinningForeignQuery;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.biz.mapper.BizBinningForeignMapper;
import com.ruoyi.biz.domain.BizBinningForeign;
import com.ruoyi.biz.service.IBizBinningForeignService;

/**
 * 国外分箱Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-08-04
 */
@Service
public class BizBinningForeignServiceImpl implements IBizBinningForeignService 
{
    @Autowired
    private BizBinningForeignMapper bizBinningForeignMapper;

    /**
     * 查询国外分箱
     * 
     * @param id 国外分箱主键
     * @return 国外分箱
     */
    @Override
    public BizBinningForeign selectBizBinningForeignById(Long id)
    {
        return bizBinningForeignMapper.selectBizBinningForeignById(id);
    }

    /**
     * 查询国外分箱列表
     * 
     * @param bizBinningForeign 国外分箱
     * @return 国外分箱
     */
    @Override
    public List<BizBinningForeign> selectBizBinningForeignList(BizBinningForeignQuery query)
    {
        return bizBinningForeignMapper.selectBizBinningForeignList(query);
    }

    /**
     * 新增国外分箱
     * 
     * @param bizBinningForeign 国外分箱
     * @return 结果
     */
    @Override
    public int insertBizBinningForeign(BizBinningForeign bizBinningForeign)
    {
        bizBinningForeign.setCreateTime(DateUtils.getNowDate());
        return bizBinningForeignMapper.insertBizBinningForeign(bizBinningForeign);
    }

    /**
     * 修改国外分箱
     * 
     * @param bizBinningForeign 国外分箱
     * @return 结果
     */
    @Override
    public int updateBizBinningForeign(BizBinningForeign bizBinningForeign)
    {
        bizBinningForeign.setUpdateTime(DateUtils.getNowDate());
        return bizBinningForeignMapper.updateBizBinningForeign(bizBinningForeign);
    }

    /**
     * 批量删除国外分箱
     * 
     * @param ids 需要删除的国外分箱主键
     * @return 结果
     */
    @Override
    public int deleteBizBinningForeignByIds(Long[] ids)
    {
        return bizBinningForeignMapper.deleteBizBinningForeignByIds(ids);
    }

    /**
     * 删除国外分箱信息
     * 
     * @param id 国外分箱主键
     * @return 结果
     */
    @Override
    public int deleteBizBinningForeignById(Long id)
    {
        return bizBinningForeignMapper.deleteBizBinningForeignById(id);
    }
}
